﻿using Domain.Entitys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.Repositorys
{
    public interface ICMRepositoy
    {
        //新增
        Task<int> CMAddAsync(CM cm);
        //删除
        Task<int> CMDeleteAsync(int id);
        Task<int> CMDeleteAsync1(string id);
        //查询
        Task<List<CM>> CMSelect(int pageIndex, int pageSize);
        //查询总条数
        int CMSelectCount();
        //查询下拉框数据
        Task<List<CMK>> CMSelectOpiton();
        //根据majorKindId查询数据
        Task<List<CM>> CMSelectId(string id);
        //根据name查询数据
        Task<CM> CMSelectName(string name);

        /// <summary>
        /// 查询全部职位数据
        /// </summary>
        /// <returns></returns>
        Task<List<CM>> CMFillAsync();

        /// <summary>
        /// 级联查询
        /// </summary>
        /// <returns></returns>
        List<Cascader> Cascaders();
    }
}
